package com.ejuornal.service;

import com.ejuornal.bean.Artical;
import com.ejuornal.bean.EditorCommit;
import com.ejuornal.bean.Message;
import com.ejuornal.bean.Page;
import com.ejuornal.bean.User;

public interface MessageService {
	/**
	 * 添加站内短信
	 * @param message
	 */
	public void add(Message message);


	/**
	 * 根据ID号查询详细站内短信
	 * @param messageId
	 * @return
	 */
	public Message findById(long messageId);
	
	/**
	 * 模糊查询，根据字段查询
	 * @param prop 字段
	 * @param object 字段值
	 * @return
	 */
	public Page<Message> findByProperty(String prop, Object object);
	
	public Page<Message> find(int current_record, String url, String hsql, Object[] objs);
	public boolean findNew(String user_email);
	public boolean delete(Long id);
	
	public boolean updateIsRead(int msgId);
	/**
	 * 给作者发送稿件信息
	 * @param ps
	 * @param as
	 * @param us
	 * @param status
	 */
	public void  sendMessage(PeriodicalService ps,ArticalService as,UserService us,MessageService ms,int articalId,String status);
	/**
	 * 给申请主编的用户发送信息
	 * @param us
	 * @param ms
	 * @param status
	 */
	public void  sendMessage( User user,MessageService ms,String status);
	/**
	 * 给申请编委的用户发送信息
	 * @param ps
	 * @param ms
	 * @param us
	 * @param ec
	 * @param status
	 */
	public void  sendMessage( PeriodicalService ps,MessageService ms,UserService us,EditorCommit ec,String status);
}
